<%@ page contentType="text/html; charset=utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JsTree Demo</title>
<jsp:include page="/common/meta.jsp"></jsp:include>
<script type="text/javascript" src="javascript/jquery.jstree.js"></script>
<style type="text/css">
#demo {
	width: 200px;
	height: 400px;
	overflow: auto;
	border: 1px solid gray;
}
</style>
<script type="text/javascript">
	$(function() {
		$.jstree._themes = "css/themes/";
		$("#demo").jstree( {
			"plugins" : [ "themes", "json_data" ],
			"json_data" : {
				"ajax" : {
					"url" : "jsTree.action",
					"data" : function(n) {
						if(n.attr)alert(n.attr("id"));
						return {
							id : (n.attr ? n.attr("id") : 0)
						};
					}
				}
			},
			"themes" : {
				"theme" : "classic",
				"dots" : true,
				"icons" : true
			}
		});
	});
</script>
</head>
<body>
<div id="demo"></div>
</body>
</html>